package cn.com.surker.material.dao;

import cn.com.surker.material.entity.MaterialStore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 材料库存记录 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2023-11-06
 */
public interface MaterialStoreDao extends BaseMapper<MaterialStore> {


    List<Map<String, Object>> findMaterial();

    Integer updateTempName(String name, String norms, Double num, Double price,
                           String id, String newType, String type1, Double sum);

    /**
     * 根据信息查询进出存金额信息
     * @param orgId
     * @param startTime
     * @param endTime
     */
    List<Map<String, Object>> findTotalPrice(Long orgId, String startTime, String endTime);


    /**
     * 根据信息查询进出存金额信息
     * @param orgId
     */
    List<Map<String, Object>> findItem(Long orgId, String name, Double count, Double unitPrice, Double totalPrice);

	/**
	 * 批量更新数据
	 * @param waitStores
	 */
	void batchSaveData(@Param("waitStores") List<MaterialStore> waitStores);

    /**
     * 根据信息查询进出存金额信息
     * @param orgId
     * @param startTime
     * @param endTime
     */
    List<Map<String, Object>> findZYTotalPrice(String unitPrice, String totalPrice, Long orgId, Long houseId,
                                               String startTime, String endTime);

}
